<?php

namespace App\Models\Cashier;

use Illuminate\Database\Eloquent\Model;

class Purchase extends Model
{
    protected $guarded = [];

    //每个商品属于某个品牌
    public function brand()
    {
        return $this->belongsTo('App\Models\Cashier\Brand');
    }

    //每个商品属于一个分类
    public function category()
    {
        return $this->belongsTo('App\Models\Cashier\Category');
    }

    //每个商品属于一个供应商
    public function apply()
    {
        return $this->belongsTo('App\Models\Cashier\Apply');
    }

    //每个商品属于一个门店
    public function store()
    {
        return $this->belongsTo('App\Models\Cashier\Store');
    }
}
